package com.service;

/**
 * -javaagent:/Users/wangdigua/IdeaProjects/spring-boot-samples/java-agent/target/java-agent-1.0.jar=agent1
 * -classpath 指定具体的执行方法类运行
 * -jar 是默认打包的类
 * java -javaagent:java-agent.jar=hello1 -classpath java-service.jar com.service.TimeTest
 *
 * @author wangzhilong
 * @date 2020/4/14
 */
public class TimeTest {

    public static void main(String[] args) {
        sayHello();
        sayHello2("hello world222222222");
    }

    public static void sayHello() {
        try {
            Thread.sleep(2000);
            System.out.println("hello world!!");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void sayHello2(String hello) {
        try {
            Thread.sleep(1000);
            System.out.println(hello);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
